#include "directSort2.h"

void InsertionSort(ElementType A[], int N)
{
    ElementType Tmp;
    int i, j;
    for (i = 0; i < N; i++)
    {
        Tmp = A[i];
        for (j = i; j > 0 && Tmp < A[j - 1]; j--)
            A[j] = A[j - 1];
        A[j] = Tmp;
    }
}
#if 0
int main()
{
    ElementType eles[6];
    eles[0] = 34;
    eles[1] = 8;
    eles[2] = 64;
    eles[3] = 51;
    eles[4] = 32;
    eles[5] = 21;
    Print(eles, 6);
    InsertionSort(eles, 6);
    Print(eles, 6);
}
#endif